package model

import (
	"github.com/Unknwon/goconfig"
	//	"github.com/jesusslim/slimgo"
	"github.com/jesusslim/slimmysql"
)

var DBS []string

func init() {
	conf, _ := goconfig.LoadConfigFile("./conf/db.ini")
	DBS = conf.MustValueArray("dbs", "dbs", ",")
	for _, conf_sq := range DBS {
		slimmysql.RegisterConnection(conf_sq, conf.MustBool(conf_sq, "rwseparate"), conf.MustValue(conf_sq, "host"), conf.MustValue(conf_sq, "port"), conf.MustValue(conf_sq, "db"), conf.MustValue(conf_sq, "user"), conf.MustValue(conf_sq, "pass"), conf.MustValue(conf_sq, "prefix"), false)
	}
}
